import HelloWorld from './components/hello-world'
import VMap from './components/ol/map/index.js'
import VView from './components/ol/view/index.js'


const components = {
	HelloWorld,
	VMap,
	VView
}
const install = function (Vue, opts = {}) {
  if (install.installed) return

  Object.keys(components).forEach(key => {
		Vue.component(key, components[key]);
  })
}

// 用于script标签引入
if (typeof window !== 'undefined' && window.Vue) {
  install(window.Vue)
}

const API = {
    install,
    ...components
};


 export default API;
